import { request, writeLog } from "@/libs/core.js"
import { Message } from 'element-ui'
const getList = async (args) => {
    (!args) && (args.pid = -1);
    (!args.pid && args.pid != 0) && (args.pid = -1);
	const data = await request({ url: '/api/star/tags/list', data: args, method: 'post' });
	if (data && data.code == 0) {
		return data.datas;
	}
	return false;
}

const doDelete = async (args) => {
	const data = await request({ url: '/api/star/tags/delete', data: args, method: 'post' });
	if (data && data.code == 0) {
		Message({ message: '数据删除成功', type: 'success', duration: 3 * 1000 });
		return true;
	}
	return false;
}


const doStatus = async (args) => {
	const data = await request({ url: '/api/star/tags/status', data: args, method: 'post' });
	if (data && data.code == 0) {
		Message({ message: '微服务状态设置成功', type: 'success', duration: 3 * 1000 });
		return true;
	}
	return false;
}


export default {
	getList, doDelete, doStatus
};
